package com.yourwork.dao.imp;



import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.yourwork.common.jpa.LoginRepository;
import com.yourwork.dao.LoginDao;
import com.yourwork.model.StaffManagement;
@Repository(value="loginDao")
public class LoginDaoImp implements LoginDao {
	@Autowired
	private LoginRepository loginRepository;
	public StaffManagement login(String number,String password ){	
		StaffManagement employeeManage = loginRepository.findByStuNumber(number,password);
	return employeeManage;
	}

	public int changePassword(String number, String password) {
		// TODO Auto-generated method stub
		return loginRepository.updatePassword(number, password);
	}
	public StaffManagement queryPhoneNumber(String phoneNumber) {
		// TODO Auto-generated method stub
		StaffManagement em = loginRepository.findByPhone(phoneNumber);
		return em;
	}
}
